<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>正则表达式</title>
</head>
<body>

</body>

<script>
    //let rp=/^[abc]{3}$/;let flag =rp.test("123");
    //let rp = /^[a-z]$/;let flag =rp.test("f");
    // let rp = /^[^a-z]$/;let flag =rp.test("-");
    //let rp = /^[\w]{2}$/; let flag =rp.test("aa");//a-z,A_Z,_,0-9
    //let rp = /^[\d]{2}$/; let flag =rp.test("12");//0-9
    //let rp = /^[\d]*$/; let flag =rp.test("1223456");//0-多
    // let rp = /^[\d]?$/; let flag =rp.test("");//0-1
     //let rp = /^[\d]+$/; let flag =rp.test("1");//0-多
     //let rp = /^[\d]{0,5}$/; let flag =rp.test("12345");//0-5次
     //let rp = /^[\d]{0,}$/; let flag =rp.test("12345222222");//0-无穷次
     let rp = /^[a|b|c]$/; let flag =rp.test("");


    alert(flag)
</script>
</html>